const CARD_STATUS = {
  0: '失效',
  1: '有效'
}
const STATUS_COLOR = {
  0: 'danger',
  1: 'success'
}

export default {
  FuiouAccountAdditionalCard: {
    list: {
      list_filter: {
        'account.user.username': '用户名',
        'account.outAcntNm': '真实姓名',
        'account.mobile': '绑定手机号',
        'outAcntNo': '额外卡号'
      },
      query: {
        '@expands': '["entity.account"]'
      },
      disabled_actions: ['delete', 'new', 'edit', 'lines'],
      list_display: [
        { property: 'account.__metadata.outAcntNm', label: '真实姓名' },
        { property: 'account.__metadata.mobile', label: '绑定手机号' },
        { property: 'account.__metadata.user.__toString', label: '用户' },
        { property: 'outAcntNo', label: '额外银行卡' },
        {
          property: 'status',
          component: {
            props: ['data'],
            data() {
              return {
                status: CARD_STATUS,
                color: STATUS_COLOR
              }
            },
            render(h) {
              return <el-tag type={this.color[this.data]} effect='plain'>{this.status[this.data]}</el-tag>
            }
          }
        }
      ]
    },
    form: {
      fields: '__all__'
    }
  }
}

